x11: Add call to XInitThreads()
authorBenjamin Otte <otte@redhat.com>
Thu, 12 Jan 2017 01:01:07 +0000 (02:01 +0100)
committerBenjamin Otte <otte@redhat.com>
Thu, 12 Jan 2017 01:01:07 +0000 (02:01 +0100)
The Mesa Vulkan drivers need XInitThreads() being called, because their
implementation has to use threads.

And I don't want to make the call depend on if Vulkan is compiled in
because that makes GTK's X11 behavior depend on compile-time flags, so
it's always called.

gdk/x11/gdkdisplay-x11.c

index 547a9ae62e890bfb75872150a375d25c614b7026..ae706bb34ee25bf72adaaaf924d4d37d2f1e49fd 100644 (file)
@@ -1367,6 +1367,8 @@ _gdk_x11_display_open (const gchar *display_name)
   gint ignore;
   gint maj, min;
 
+  XInitThreads ();
+
   xdisplay = XOpenDisplay (display_name);
   if (!xdisplay)
     return NULL;